package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/6/17.
 */
public class UserCancelFollowAction extends AHttpService<PbBean.PbResUserDelFollow> {
    private String userId;

    public static UserCancelFollowAction newInstance(Context context, String userId) {
        return new UserCancelFollowAction(context, userId);
    }

    private UserCancelFollowAction(Context context, String userId) {
        super(context);
        this.userId = userId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserDelFollow.Builder builder = PbBean.PbReqUserDelFollow.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setUserId(userId);

        return apiService.cancelFollow(builder.build());
    }
}
